home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 22 / AMUG_22-4.ISO / Files IV / Prog / T / TinyTools-2.sit / TinyTools / StdPrefs.c < prev    next >
MacBinary  |  1997-10-07  |  3.9 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Oct 7 03:05:48 1997, modified Tue Oct 7 03:05:48 1997, creator 'MPS ', type ASCII, 3250 bytes "StdPrefs.c" , at 0xd32 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% lsar MacBinary default
100% librempegprobeID NGC (Nintendo DSP Standard) (ngcdspstd) default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 53 74 64 50 72 65 | 66 73 2e 63 00 00 00 00 |..StdPre|fs.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 0c b2 00 | 00 01 ac b0 5f 8f cc b0 |........|...._...|
|00000060| 5f 8f cc 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |_.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 67 e1 00 00 |........|....g...|
|00000080| 0d 2f 2a 20 46 69 6c 65 | 20 53 74 64 50 72 65 66 |./* File| StdPref|
|00000090| 73 2e 63 0d 09 53 74 61 | 6e 64 61 72 64 20 70 72 |s.c..Sta|ndard pr|
|000000a0| 65 66 65 72 65 6e 63 65 | 73 20 66 69 6c 65 20 68 |eference|s file h|
|000000b0| 61 6e 64 6c 69 6e 67 20 | 72 6f 75 74 69 6e 65 73 |andling |routines|
|000000c0| 2c 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |, implem|entation|
|000000d0| 2e 0d 09 53 79 73 74 65 | 6d 20 36 20 6f 72 20 62 |...Syste|m 6 or b|
|000000e0| 65 74 74 65 72 20 72 65 | 71 75 69 72 65 73 20 48 |etter re|quires H|
|000000f0| 46 53 0d 09 43 6f 70 79 | 72 69 67 68 74 20 28 63 |FS..Copy|right (c|
|00000100| 29 20 31 39 39 37 20 62 | 79 20 4a 6f 68 6e 20 4d |) 1997 b|y John M|
|00000110| 6f 6e 74 62 72 69 61 6e | 64 2e 20 20 41 6c 6c 20 |ontbrian|d. All |
|00000120| 52 69 67 68 74 73 20 52 | 65 73 65 72 76 65 64 2e |Rights R|eserved.|
|00000130| 0d 09 50 65 72 6d 69 73 | 73 69 6f 6e 20 67 72 61 |..Permis|sion gra|
|00000140| 6e 74 65 64 20 66 6f 72 | 20 70 75 62 6c 69 63 20 |nted for| public |
|00000150| 75 73 65 2e 0d 09 44 69 | 73 74 72 69 62 75 74 65 |use...Di|stribute|
|00000160| 20 66 72 65 65 6c 79 20 | 69 6e 20 61 72 65 61 73 | freely |in areas|
|00000170| 20 77 68 65 72 65 20 74 | 68 65 20 6c 61 77 73 20 | where t|he laws |
|00000180| 6f 66 20 63 6f 70 79 72 | 69 67 68 74 20 61 70 70 |of copyr|ight app|
|00000190| 6c 79 2e 0d 09 55 53 45 | 20 41 54 20 59 4f 55 52 |ly...USE| AT YOUR|
|000001a0| 20 4f 57 4e 20 52 49 53 | 4b 2e 0d 09 44 4f 20 4e | OWN RIS|K...DO N|
|000001b0| 4f 54 20 44 49 53 54 52 | 49 42 55 54 45 20 4d 4f |OT DISTR|IBUTE MO|
|000001c0| 44 49 46 49 45 44 20 43 | 4f 50 49 45 53 2e 0d 09 |DIFIED C|OPIES...|
|000001d0| 43 6f 6d 6d 65 6e 74 73 | 2f 71 75 65 73 74 69 6f |Comments|/questio|
|000001e0| 6e 73 2f 70 6f 73 74 63 | 61 72 64 73 20 74 6f 20 |ns/postc|ards to |
|000001f0| 74 68 65 20 61 75 74 68 | 6f 72 20 61 74 20 74 68 |the auth|or at th|
|00000200| 65 20 61 64 64 72 65 73 | 73 3a 0d 09 09 4a 6f 68 |e addres|s:...Joh|
|00000210| 6e 20 4d 6f 6e 74 62 72 | 69 61 6e 64 0d 09 09 50 |n Montbr|iand...P|
|00000220| 2e 4f 2e 20 42 6f 78 2e | 20 31 31 33 33 0d 09 09 |.O. Box.| 1133...|
|00000230| 53 61 73 6b 61 74 6f 6f | 6e 20 53 61 73 6b 61 74 |Saskatoo|n Saskat|
|00000240| 63 68 65 77 61 6e 20 43 | 61 6e 61 64 61 0d 09 09 |chewan C|anada...|
|00000250| 53 37 4b 20 33 4e 32 0d | 09 6f 72 20 62 79 20 65 |S7K 3N2.|.or by e|
|00000260| 6d 61 69 6c 20 61 74 3a | 0d 09 09 74 69 6e 79 6a |mail at:|...tinyj|
|00000270| 6f 68 6e 40 73 6b 2e 73 | 79 6d 70 61 74 69 63 6f |ohn@sk.s|ympatico|
|00000280| 2e 63 61 0d 09 49 66 20 | 79 6f 75 20 77 6f 75 6c |.ca..If |you woul|
|00000290| 64 20 6c 69 6b 65 20 74 | 6f 20 68 61 76 65 3a 0d |d like t|o have:.|
|000002a0| 09 09 74 65 63 68 6e 69 | 63 61 6c 20 73 75 70 70 |..techni|cal supp|
|000002b0| 6f 72 74 20 72 65 67 61 | 72 64 69 6e 67 20 74 68 |ort rega|rding th|
|000002c0| 69 73 20 66 69 6c 65 2c | 20 73 65 6e 64 20 61 20 |is file,| send a |
|000002d0| 70 6f 73 74 63 61 72 64 | 2e 0d 09 73 65 65 20 61 |postcard|...see a|
|000002e0| 6c 73 6f 3a 0d 09 09 68 | 74 74 70 3a 2f 2f 77 77 |lso:...h|ttp://ww|
|000002f0| 77 33 2e 73 6b 2e 73 79 | 6d 70 61 74 69 63 6f 2e |w3.sk.sy|mpatico.|
|00000300| 63 61 2f 74 69 6e 79 6a | 6f 68 6e 0d 2a 2f 0d 0d |ca/tinyj|ohn.*/..|
|00000310| 23 69 6e 63 6c 75 64 65 | 20 22 53 74 64 50 72 65 |#include| "StdPre|
|00000320| 66 73 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 3c |fs.h".#i|nclude <|
|00000330| 46 6f 6c 64 65 72 73 2e | 68 3e 0d 23 69 6e 63 6c |Folders.|h>.#incl|
|00000340| 75 64 65 20 3c 4f 53 55 | 74 69 6c 73 2e 68 3e 0d |ude <OSU|tils.h>.|
|00000350| 23 69 6e 63 6c 75 64 65 | 20 3c 52 65 73 6f 75 72 |#include| <Resour|
|00000360| 63 65 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ces.h>.#|include |
|00000370| 3c 47 65 73 74 61 6c 74 | 2e 68 3e 0d 23 69 6e 63 |<Gestalt|.h>.#inc|
|00000380| 6c 75 64 65 20 3c 53 74 | 72 69 6e 67 2e 68 3e 0d |lude <St|ring.h>.|
|00000390| 23 69 6e 63 6c 75 64 65 | 20 3c 50 4c 53 74 72 69 |#include| <PLStri|
|000003a0| 6e 67 46 75 6e 63 73 2e | 68 3e 0d 23 69 6e 63 6c |ngFuncs.|h>.#incl|
|000003b0| 75 64 65 20 3c 45 72 72 | 6f 72 73 2e 68 3e 0d 23 |ude <Err|ors.h>.#|
|000003c0| 69 6e 63 6c 75 64 65 20 | 3c 54 65 78 74 55 74 69 |include |<TextUti|
|000003d0| 6c 73 2e 68 3e 0d 0d 0d | 4f 53 45 72 72 20 46 69 |ls.h>...|OSErr Fi|
|000003e0| 6e 64 50 72 65 66 65 72 | 65 6e 63 65 73 46 6f 6c |ndPrefer|encesFol|
|000003f0| 64 65 72 28 73 68 6f 72 | 74 20 2a 70 76 6f 6c 2c |der(shor|t *pvol,|
|00000400| 20 6c 6f 6e 67 20 2a 70 | 64 69 72 29 20 7b 0d 09 | long *p|dir) {..|
|00000410| 4f 53 45 72 72 20 65 72 | 72 3b 0d 09 6c 6f 6e 67 |OSErr er|r;..long|
|00000420| 20 72 65 73 70 6f 6e 73 | 65 20 3d 20 30 3b 0d 09 | respons|e = 0;..|
|00000430| 2a 70 76 6f 6c 20 3d 20 | 30 3b 0d 09 2a 70 64 69 |*pvol = |0;..*pdi|
|00000440| 72 20 3d 20 30 3b 0d 09 | 69 66 20 28 47 65 73 74 |r = 0;..|if (Gest|
|00000450| 61 6c 74 28 67 65 73 74 | 61 6c 74 46 69 6e 64 46 |alt(gest|altFindF|
|00000460| 6f 6c 64 65 72 41 74 74 | 72 2c 20 26 72 65 73 70 |olderAtt|r, &resp|
|00000470| 6f 6e 73 65 29 20 21 3d | 20 6e 6f 45 72 72 29 20 |onse) !=| noErr) |
|00000480| 72 65 73 70 6f 6e 73 65 | 20 3d 20 30 3b 0d 09 69 |response| = 0;..i|
|00000490| 66 20 28 28 72 65 73 70 | 6f 6e 73 65 20 26 20 28 |f ((resp|onse & (|
|000004a0| 31 3c 3c 67 65 73 74 61 | 6c 74 46 69 6e 64 46 6f |1<<gesta|ltFindFo|
|000004b0| 6c 64 65 72 50 72 65 73 | 65 6e 74 29 29 20 21 3d |lderPres|ent)) !=|
|000004c0| 20 30 29 20 7b 0d 09 09 | 65 72 72 20 3d 20 46 69 | 0) {...|err = Fi|
|000004d0| 6e 64 46 6f 6c 64 65 72 | 28 6b 4f 6e 53 79 73 74 |ndFolder|(kOnSyst|
|000004e0| 65 6d 44 69 73 6b 2c 20 | 6b 50 72 65 66 65 72 65 |emDisk, |kPrefere|
|000004f0| 6e 63 65 73 46 6f 6c 64 | 65 72 54 79 70 65 2c 20 |ncesFold|erType, |
|00000500| 6b 43 72 65 61 74 65 46 | 6f 6c 64 65 72 2c 20 70 |kCreateF|older, p|
|00000510| 76 6f 6c 2c 20 70 64 69 | 72 29 3b 0d 09 7d 20 65 |vol, pdi|r);..} e|
|00000520| 6c 73 65 20 7b 0d 09 09 | 6c 6f 6e 67 20 70 72 6f |lse {...|long pro|
|00000530| 63 49 44 3b 0d 09 09 53 | 79 73 45 6e 76 52 65 63 |cID;...S|ysEnvRec|
|00000540| 20 74 68 65 5f 65 6e 76 | 3b 0d 09 09 53 79 73 45 | the_env|;...SysE|
|00000550| 6e 76 69 72 6f 6e 73 28 | 63 75 72 53 79 73 45 6e |nvirons(|curSysEn|
|00000560| 76 56 65 72 73 2c 20 26 | 74 68 65 5f 65 6e 76 29 |vVers, &|the_env)|
|00000570| 3b 0d 09 09 65 72 72 20 | 3d 20 47 65 74 57 44 49 |;...err |= GetWDI|
|00000580| 6e 66 6f 28 74 68 65 5f | 65 6e 76 2e 73 79 73 56 |nfo(the_|env.sysV|
|00000590| 52 65 66 4e 75 6d 2c 20 | 70 76 6f 6c 2c 20 70 64 |RefNum, |pvol, pd|
|000005a0| 69 72 2c 20 26 70 72 6f | 63 49 44 29 3b 0d 09 7d |ir, &pro|cID);..}|
|000005b0| 0d 09 72 65 74 75 72 6e | 20 65 72 72 3b 0d 7d 0d |..return| err;.}.|
|000005c0| 0d 0d 4f 53 45 72 72 20 | 50 72 65 66 73 44 69 72 |..OSErr |PrefsDir|
|000005d0| 53 65 61 72 63 68 28 4f | 53 54 79 70 65 20 63 72 |Search(O|SType cr|
|000005e0| 65 61 74 6f 72 2c 20 4f | 53 54 79 70 65 20 74 79 |eator, O|SType ty|
|000005f0| 70 65 2c 20 73 68 6f 72 | 74 20 2a 66 76 6f 6c 2c |pe, shor|t *fvol,|
|00000600| 20 6c 6f 6e 67 20 2a 66 | 64 69 72 2c 20 53 74 72 | long *f|dir, Str|
|00000610| 69 6e 67 50 74 72 20 66 | 6e 61 6d 65 29 20 7b 0d |ingPtr f|name) {.|
|00000620| 09 73 68 6f 72 74 20 76 | 6f 6c 3b 0d 09 6c 6f 6e |.short v|ol;..lon|
|00000630| 67 20 64 69 72 3b 0d 09 | 43 49 6e 66 6f 50 42 52 |g dir;..|CInfoPBR|
|00000640| 65 63 20 63 61 74 3b 0d | 09 46 49 6e 66 6f 20 2a |ec cat;.|.FInfo *|
|00000650| 66 69 6e 3b 0d 09 53 74 | 72 32 35 35 20 6e 61 6d |fin;..St|r255 nam|
|00000660| 65 3b 0d 09 4f 53 45 72 | 72 20 65 72 72 3b 0d 0d |e;..OSEr|r err;..|
|00000670| 09 09 2f 2a 20 66 69 6e | 64 20 74 68 65 20 70 72 |../* fin|d the pr|
|00000680| 65 66 65 72 65 6e 63 65 | 73 20 66 6f 6c 64 65 72 |eference|s folder|
|00000690| 20 2a 2f 0d 20 09 65 72 | 72 20 3d 20 46 69 6e 64 | */. .er|r = Find|
|000006a0| 50 72 65 66 65 72 65 6e | 63 65 73 46 6f 6c 64 65 |Preferen|cesFolde|
|000006b0| 72 28 26 76 6f 6c 2c 20 | 26 64 69 72 29 3b 0d 09 |r(&vol, |&dir);..|
|000006c0| 69 66 20 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if (err |!= noErr|
|000006d0| 29 20 72 65 74 75 72 6e | 20 65 72 72 3b 0d 0d 09 |) return| err;...|
|000006e0| 09 2f 2a 20 6c 6f 6f 6b | 20 66 6f 72 20 74 68 65 |./* look| for the|
|000006f0| 20 66 69 6c 65 20 2a 2f | 0d 09 6d 65 6d 73 65 74 | file */|..memset|
|00000700| 28 26 63 61 74 2c 20 30 | 2c 20 73 69 7a 65 6f 66 |(&cat, 0|, sizeof|
|00000710| 28 63 61 74 29 29 3b 0d | 09 63 61 74 2e 68 46 69 |(cat));.|.cat.hFi|
|00000720| 6c 65 49 6e 66 6f 2e 69 | 6f 4e 61 6d 65 50 74 72 |leInfo.i|oNamePtr|
|00000730| 20 3d 20 6e 61 6d 65 3b | 0d 09 63 61 74 2e 68 46 | = name;|..cat.hF|
|00000740| 69 6c 65 49 6e 66 6f 2e | 69 6f 56 52 65 66 4e 75 |ileInfo.|ioVRefNu|
|00000750| 6d 20 3d 20 76 6f 6c 3b | 0d 09 63 61 74 2e 68 46 |m = vol;|..cat.hF|
|00000760| 69 6c 65 49 6e 66 6f 2e | 69 6f 44 69 72 49 44 20 |ileInfo.|ioDirID |
|00000770| 3d 20 64 69 72 3b 0d 09 | 63 61 74 2e 68 46 69 6c |= dir;..|cat.hFil|
|00000780| 65 49 6e 66 6f 2e 69 6f | 46 44 69 72 49 6e 64 65 |eInfo.io|FDirInde|
|00000790| 78 20 3d 20 31 3b 0d 09 | 66 69 6e 20 3d 20 26 63 |x = 1;..|fin = &c|
|000007a0| 61 74 2e 68 46 69 6c 65 | 49 6e 66 6f 2e 69 6f 46 |at.hFile|Info.ioF|
|000007b0| 6c 46 6e 64 72 49 6e 66 | 6f 3b 0d 09 77 68 69 6c |lFndrInf|o;..whil|
|000007c0| 65 20 28 50 42 47 65 74 | 43 61 74 49 6e 66 6f 53 |e (PBGet|CatInfoS|
|000007d0| 79 6e 63 28 26 63 61 74 | 29 20 3d 3d 20 6e 6f 45 |ync(&cat|) == noE|
|000007e0| 72 72 29 20 7b 0d 09 09 | 69 66 20 28 28 63 61 74 |rr) {...|if ((cat|
|000007f0| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 69 6f 46 6c 41 |.hFileIn|fo.ioFlA|
|00000800| 74 74 72 69 62 20 26 20 | 31 36 29 20 3d 3d 20 30 |ttrib & |16) == 0|
|00000810| 0d 09 09 26 26 20 66 69 | 6e 2d 3e 66 64 54 79 70 |...&& fi|n->fdTyp|
|00000820| 65 20 3d 3d 20 74 79 70 | 65 20 0d 09 09 26 26 20 |e == typ|e ...&& |
|00000830| 66 69 6e 2d 3e 66 64 43 | 72 65 61 74 6f 72 20 3d |fin->fdC|reator =|
|00000840| 3d 20 63 72 65 61 74 6f | 72 29 20 7b 0d 09 09 09 |= creato|r) {....|
|00000850| 50 4c 73 74 72 63 70 79 | 28 66 6e 61 6d 65 2c 20 |PLstrcpy|(fname, |
|00000860| 6e 61 6d 65 29 3b 0d 09 | 09 09 2a 66 76 6f 6c 20 |name);..|..*fvol |
|00000870| 3d 20 76 6f 6c 3b 0d 09 | 09 09 2a 66 64 69 72 20 |= vol;..|..*fdir |
|00000880| 3d 20 64 69 72 3b 0d 09 | 09 09 72 65 74 75 72 6e |= dir;..|..return|
|00000890| 20 6e 6f 45 72 72 3b 0d | 09 09 7d 0d 09 09 63 61 | noErr;.|..}...ca|
|000008a0| 74 2e 68 46 69 6c 65 49 | 6e 66 6f 2e 69 6f 44 69 |t.hFileI|nfo.ioDi|
|000008b0| 72 49 44 20 3d 20 64 69 | 72 3b 0d 09 09 63 61 74 |rID = di|r;...cat|
|000008c0| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 69 6f 46 44 69 |.hFileIn|fo.ioFDi|
|000008d0| 72 49 6e 64 65 78 2b 2b | 3b 0d 09 7d 0d 09 72 65 |rIndex++|;..}..re|
|000008e0| 74 75 72 6e 20 66 6e 66 | 45 72 72 3b 0d 7d 0d 0d |turn fnf|Err;.}..|
|000008f0| 4f 53 45 72 72 20 46 53 | 70 50 72 65 66 73 44 69 |OSErr FS|pPrefsDi|
|00000900| 72 53 65 61 72 63 68 28 | 4f 53 54 79 70 65 20 63 |rSearch(|OSType c|
|00000910| 72 65 61 74 6f 72 2c 20 | 4f 53 54 79 70 65 20 74 |reator, |OSType t|
|00000920| 79 70 65 2c 20 46 53 53 | 70 65 63 20 2a 73 70 65 |ype, FSS|pec *spe|
|00000930| 63 29 20 7b 0d 09 72 65 | 74 75 72 6e 20 50 72 65 |c) {..re|turn Pre|
|00000940| 66 73 44 69 72 53 65 61 | 72 63 68 28 63 72 65 61 |fsDirSea|rch(crea|
|00000950| 74 6f 72 2c 20 74 79 70 | 65 2c 20 26 73 70 65 63 |tor, typ|e, &spec|
|00000960| 2d 3e 76 52 65 66 4e 75 | 6d 2c 20 26 73 70 65 63 |->vRefNu|m, &spec|
|00000970| 2d 3e 70 61 72 49 44 2c | 20 73 70 65 63 2d 3e 6e |->parID,| spec->n|
|00000980| 61 6d 65 29 3b 0d 7d 0d | 0d 4f 53 45 72 72 20 50 |ame);.}.|.OSErr P|
|00000990| 72 65 66 73 43 72 65 61 | 74 65 28 4f 53 54 79 70 |refsCrea|te(OSTyp|
|000009a0| 65 20 63 72 65 61 74 6f | 72 2c 20 4f 53 54 79 70 |e creato|r, OSTyp|
|000009b0| 65 20 74 79 70 65 2c 20 | 53 74 72 69 6e 67 50 74 |e type, |StringPt|
|000009c0| 72 20 64 65 66 61 75 6c | 74 6e 61 6d 65 2c 20 73 |r defaul|tname, s|
|000009d0| 68 6f 72 74 20 2a 66 76 | 6f 6c 2c 20 6c 6f 6e 67 |hort *fv|ol, long|
|000009e0| 20 2a 66 64 69 72 2c 20 | 53 74 72 69 6e 67 50 74 | *fdir, |StringPt|
|000009f0| 72 20 66 6e 61 6d 65 29 | 20 7b 0d 09 4f 53 45 72 |r fname)| {..OSEr|
|00000a00| 72 20 65 72 72 3b 0d 09 | 6c 6f 6e 67 20 6e 75 6d |r err;..|long num|
|00000a10| 3b 0d 09 46 49 6e 66 6f | 20 66 6e 64 72 49 6e 66 |;..FInfo| fndrInf|
|00000a20| 6f 3b 0d 09 53 74 72 32 | 35 35 20 73 3b 0d 09 6e |o;..Str2|55 s;..n|
|00000a30| 75 6d 20 3d 20 31 3b 0d | 09 69 66 20 28 28 65 72 |um = 1;.|.if ((er|
|00000a40| 72 20 3d 20 46 69 6e 64 | 50 72 65 66 65 72 65 6e |r = Find|Preferen|
|00000a50| 63 65 73 46 6f 6c 64 65 | 72 28 66 76 6f 6c 2c 20 |cesFolde|r(fvol, |
|00000a60| 66 64 69 72 29 29 20 21 | 3d 20 6e 6f 45 72 72 29 |fdir)) !|= noErr)|
|00000a70| 20 67 6f 74 6f 20 62 61 | 69 6c 3b 0d 09 50 4c 73 | goto ba|il;..PLs|
|00000a80| 74 72 63 70 79 28 66 6e | 61 6d 65 2c 20 64 65 66 |trcpy(fn|ame, def|
|00000a90| 61 75 6c 74 6e 61 6d 65 | 29 3b 0d 09 77 68 69 6c |aultname|);..whil|
|00000aa0| 65 20 28 31 29 20 7b 0d | 09 09 65 72 72 20 3d 20 |e (1) {.|..err = |
|00000ab0| 48 47 65 74 46 49 6e 66 | 6f 28 2a 66 76 6f 6c 2c |HGetFInf|o(*fvol,|
|00000ac0| 20 2a 66 64 69 72 2c 20 | 66 6e 61 6d 65 2c 20 26 | *fdir, |fname, &|
|00000ad0| 66 6e 64 72 49 6e 66 6f | 29 3b 0d 09 09 69 66 20 |fndrInfo|);...if |
|00000ae0| 28 65 72 72 20 3d 3d 20 | 66 6e 66 45 72 72 29 20 |(err == |fnfErr) |
|00000af0| 62 72 65 61 6b 3b 20 65 | 6c 73 65 20 69 66 20 28 |break; e|lse if (|
|00000b00| 65 72 72 20 21 3d 20 6e | 6f 45 72 72 29 20 67 6f |err != n|oErr) go|
|00000b10| 74 6f 20 62 61 69 6c 3b | 0d 09 09 50 4c 73 74 72 |to bail;|...PLstr|
|00000b20| 63 70 79 28 66 6e 61 6d | 65 2c 20 64 65 66 61 75 |cpy(fnam|e, defau|
|00000b30| 6c 74 6e 61 6d 65 29 3b | 0d 09 09 50 4c 73 74 72 |ltname);|...PLstr|
|00000b40| 63 61 74 28 66 6e 61 6d | 65 2c 20 22 5c 70 20 22 |cat(fnam|e, "\p "|
|00000b50| 29 3b 20 2f 2a 20 66 6f | 6c 6c 6f 77 65 64 20 62 |); /* fo|llowed b|
|00000b60| 79 20 61 20 73 70 61 63 | 65 20 2a 2f 0d 09 09 4e |y a spac|e */...N|
|00000b70| 75 6d 54 6f 53 74 72 69 | 6e 67 28 6e 75 6d 2b 2b |umToStri|ng(num++|
|00000b80| 2c 20 73 29 3b 0d 09 09 | 50 4c 73 74 72 63 61 74 |, s);...|PLstrcat|
|00000b90| 28 66 6e 61 6d 65 2c 20 | 73 29 3b 20 2f 2a 20 61 |(fname, |s); /* a|
|00000ba0| 6e 64 20 61 20 6e 75 6d | 62 65 72 20 2a 2f 0d 09 |nd a num|ber */..|
|00000bb0| 7d 0d 09 65 72 72 20 3d | 20 48 43 72 65 61 74 65 |}..err =| HCreate|
|00000bc0| 28 2a 66 76 6f 6c 2c 20 | 2a 66 64 69 72 2c 20 66 |(*fvol, |*fdir, f|
|00000bd0| 6e 61 6d 65 2c 20 63 72 | 65 61 74 6f 72 2c 20 74 |name, cr|eator, t|
|00000be0| 79 70 65 29 3b 0d 09 69 | 66 20 28 65 72 72 20 21 |ype);..i|f (err !|
|00000bf0| 3d 20 6e 6f 45 72 72 29 | 20 67 6f 74 6f 20 62 61 |= noErr)| goto ba|
|00000c00| 69 6c 3b 0d 09 48 43 72 | 65 61 74 65 52 65 73 46 |il;..HCr|eateResF|
|00000c10| 69 6c 65 28 2a 66 76 6f | 6c 2c 20 2a 66 64 69 72 |ile(*fvo|l, *fdir|
|00000c20| 2c 20 66 6e 61 6d 65 29 | 3b 0d 09 69 66 20 28 28 |, fname)|;..if ((|
|00000c30| 65 72 72 20 3d 20 52 65 | 73 45 72 72 6f 72 28 29 |err = Re|sError()|
|00000c40| 29 20 21 3d 20 6e 6f 45 | 72 72 29 20 67 6f 74 6f |) != noE|rr) goto|
|00000c50| 20 62 61 69 6c 3b 0d 09 | 72 65 74 75 72 6e 20 6e | bail;..|return n|
|00000c60| 6f 45 72 72 3b 0d 62 61 | 69 6c 3a 0d 09 72 65 74 |oErr;.ba|il:..ret|
|00000c70| 75 72 6e 20 65 72 72 3b | 0d 7d 0d 0d 4f 53 45 72 |urn err;|.}..OSEr|
|00000c80| 72 20 46 53 70 50 72 65 | 66 73 43 72 65 61 74 65 |r FSpPre|fsCreate|
|00000c90| 28 4f 53 54 79 70 65 20 | 63 72 65 61 74 6f 72 2c |(OSType |creator,|
|00000ca0| 20 4f 53 54 79 70 65 20 | 74 79 70 65 2c 20 53 74 | OSType |type, St|
|00000cb0| 72 69 6e 67 50 74 72 20 | 64 65 66 61 75 6c 74 6e |ringPtr |defaultn|
|00000cc0| 61 6d 65 2c 20 46 53 53 | 70 65 63 20 2a 73 70 65 |ame, FSS|pec *spe|
|00000cd0| 63 29 20 7b 0d 09 72 65 | 74 75 72 6e 20 50 72 65 |c) {..re|turn Pre|
|00000ce0| 66 73 43 72 65 61 74 65 | 28 63 72 65 61 74 6f 72 |fsCreate|(creator|
|00000cf0| 2c 20 74 79 70 65 2c 20 | 64 65 66 61 75 6c 74 6e |, type, |defaultn|
|00000d00| 61 6d 65 2c 20 26 73 70 | 65 63 2d 3e 76 52 65 66 |ame, &sp|ec->vRef|
|00000d10| 4e 75 6d 2c 20 26 73 70 | 65 63 2d 3e 70 61 72 49 |Num, &sp|ec->parI|
|00000d20| 44 2c 20 73 70 65 63 2d | 3e 6e 61 6d 65 29 3b 0d |D, spec-|>name);.|
|00000d30| 7d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |}.......|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000d90| 61 6c 20 76 6f 69 64 20 | 52 54 55 54 69 6d 65 6f |al void |RTUTimeo|
|00000da0| 75 74 54 61 73 6b 45 6e | 74 72 79 28 76 6f 69 64 |utTaskEn|try(void|
|00000db0| 0a 53 74 64 50 72 65 66 | 73 2e 63 2d 02 00 00 00 |.StdPref|s.c-....|
|00000dc0| 54 45 58 54 4d 50 53 20 | 01 00 ff ff ff ff 00 00 |TEXTMPS |........|
|00000dd0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 af 0f cd 30 00 00 | 0c b2 00 00 01 ac 74 52 |.....0..|......tR|
|00000e00| 65 67 69 73 74 65 72 41 | 30 28 29 3b 0d 09 64 67 |egisterA|0();..dg|
|00000e10| 20 3d 20 28 4d 79 44 72 | 69 76 65 72 47 6c 6f 62 | = (MyDr|iverGlob|
|00000e20| 61 6c 73 20 2a 29 20 28 | 70 61 72 61 6d 20 2d 20 |als *) (|param - |
|00000e30| 6f 66 66 73 65 74 6f 66 | 28 4d 79 44 72 69 76 65 |offsetof|(MyDrive|
|00000e40| 72 47 6c 6f 62 61 6c 73 | 2c 20 74 69 6d 65 72 29 |rGlobals|, timer)|
|00000e50| 29 3b 0d 09 69 66 20 28 | 64 67 2d 3e 74 69 6d 65 |);..if (|dg->time|
|00000e60| 72 76 61 6c 75 65 20 3e | 20 31 29 20 7b 0d 09 09 |rvalue >| 1) {...|
|00000e70| 64 67 2d 3e 74 69 6d 65 | 72 76 61 6c 75 65 2d 2d |dg->time|rvalue--|
|00000e80| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 3e 0d 23 |...H..Ge|neva.>.#|
|00000e90| 03 df 6d b0 75 64 65 20 | 3c 4f 53 55 74 69 6c 73 |..m.ude |<OSUtils|
|00000ea0| 2e 68 3e 0d 23 69 00 03 | 00 08 00 53 01 08 02 96 |.h>.#i..|...S....|
|00000eb0| 03 25 00 53 01 08 02 96 | 03 25 b0 5f 57 8c 00 00 |.%.S....|.%._W...|
|00000ec0| 02 8c 00 00 02 8c 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00000ed0| 00 53 01 08 02 96 03 25 | 00 53 01 08 02 96 03 25 |.S.....%|.S.....%|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 03 d6 |.....n..|.n...>..|
|00000f00| 71 38 26 32 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |q8&2....|.>..MPSR|
|00000f10| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 03 f0 ff ff 00 00 00 4c | 03 d7 c9 60 00 00 00 00 |.......L|...`....|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+